<div class="content__title">
    <h1>Read & Write zip file, <a href="//ng-alain.com/components/zip" target="_blank">Document</a></h1>
</div>
<nz-card nzTitle="解压">
    <button nz-button (click)="url()">Via Url</button>
    <input type="file" (change)="change($event)" multiple="false" class="ml-sm" />
    <ol>
        <li *ngFor="let i of data">{{i | json}}</li>
    </ol>
</nz-card>
<nz-card nzTitle="压缩" *ngIf="instance">
    <button nz-button (click)="files.push({})" [nzType]="'primary'">new</button>
    <button nz-button (click)="download()" class="ml-sm mb-sm">download</button>
    <nz-table [nzDataSource]="files" [nzIsPagination]="false">
        <thead nz-thead>
            <tr>
            <th nz-th><span>path</span></th>
            <th nz-th><span>url</span></th>
            </tr>
        </thead>
        <tbody nz-tbody>
            <tr *ngFor="let i of files; let index = index">
                <td nz-td><nz-input [(ngModel)]="i.path" name="path{{index}}"></nz-input></td>
                <td nz-td><nz-input [(ngModel)]="i.url" name="url{{index}}"></nz-input></td>
            </tr>
        </tbody>
    </nz-table>
</nz-card>
